package com.pet.server.po;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * PetInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "option")
public class Option implements java.io.Serializable {

	// Fields

	private Integer optionId;
	//提问用户
	private Integer requestId;
	//选项
	private String optionText;
	//投票数
	private Integer times;
	
	
	
	// Constructors

	/** default constructor */
	public Option() {
	}

	
	public Option(Integer optionId, Integer requestId, String optionText,
			Integer times) {
		super();
		this.optionId = optionId;
		this.requestId = requestId;
		this.optionText = optionText;
		this.times = times;
	}




	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "option_id", unique = true, nullable = false)
	public Integer getOptionId() {
		return optionId;
	}

	/**
	 * @param optionId the optionId to set
	 */
	public void setOptionId(Integer optionId) {
		this.optionId = optionId;
	}

	@Column(name = "request_id", nullable = false, length = 32)
	public Integer getRequestId() {
		return requestId;
	}
	/**
	 * @param requestId the requestId to set
	 */
	public void setRequestId(Integer requestId) {
		this.requestId = requestId;
	}

	/**
	 * @return the optionText
	 */
	@Column(name = "option_text", nullable = false, length = 256)
	public String getOptionText() {
		return optionText;
	}

	/**
	 * @param optionText the optionText to set
	 */
	public void setOptionText(String optionText) {
		this.optionText = optionText;
	}

	@Column(name = "times", nullable = false, length = 20)
	public Integer getTimes() {
		return times;
	}

	/**
	 * @param times the times to set
	 */
	public void setTimes(Integer times) {
		this.times = times;
	}

}